<include file="../Public/_header.html" />

<!-- 编辑器样式文件 -->
<link href="__PUBLIC__/Js/editor/editor/theme/base-min.css" rel="stylesheet"/>
<!--[if lt IE 8]>
<link href="__PUBLIC__/Js/editor/editor/theme/cool/editor-pkg-min-mhtml.css" rel="stylesheet"/>
<![endif]-->
<!--[if gte IE 8]><!-->
<link href="__PUBLIC__/Js/editor/editor/theme/cool/editor-pkg-min-datauri.css" rel="stylesheet"/>
<!--<![endif]-->

<include file="../Public/editor.html" />

<div class="so_main">
  <div id="editTpl_div">
  	<div class="page_tit"><eq name="type" value="edit">编辑<else/>添加</eq>文档</div>
	
	<div class="form2">
	<form method="post" action="{:U('/Global/doEditDocument')}">
	<eq name="type" value="edit"><input type="hidden" name="document_id" value="{$document_id}"></eq>
    <dl class="lineD">
      <dt>文档标题：</dt>
      <dd>
        <input name="title" type="text" value="{$title}"> *
	  </dd>
    </dl>
	<dl class="lineD">
				<dt>文档类型：</dt>
				<dd>
		      	<input id="sortdesc" type="text" value="{$sort_id|getCategoryName}" 
		      					onclick="ui.box.load(
		    											'{:U('Index://Public/showtree',array('code'=>'document'))}'
		    											,{ title:'查看商品分类' })"
		      					readonly>
		      	<input id="sort_id" name="sort_id" type="hidden" value="{$sort_id}">
					<script>
							function _tmp_setselectdict(rel,txt){
					    		$('#sortdesc').val(txt);
					    		$('#sort_id').val(rel);
					    }
				</script>
				</dd>
			</dl>
    
    <dl class="lineD">
      <dt>是否有效：</dt>
      <dd>
      <php>if(!empty($document_id)){</php>
      	<input type="radio" name="is_active" value="1" <eq name="is_active" value="1">checked</eq>>是
		&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="radio" name="is_active" value="0" <neq name="is_active" value="1">checked</neq>>否
      <php>}else{</php>
      	<input type="radio" name="is_active" value="1" checked>是
		&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="radio" name="is_active" value="0">否
	  <php>}</php>
	  </dd>
    </dl>

	<dl class="lineD">
      <dt>页脚显示：</dt>
      <dd>
      <php>if(!empty($document_id)){</php>
      	<input type="radio" name="is_on_footer" value="1" <eq name="is_on_footer" value="1">checked</eq>>是
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="is_on_footer" value="0" <neq name="is_on_footer" value="1">checked</neq>>否
      <php>}else{</php>
      	<input type="radio" name="is_on_footer" value="1" checked>是
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="is_on_footer" value="0" >否
	  <php>}</php>
	  </dd>
    </dl>

    <dl class="">
      <dt>文档内容：</dt>
      <dd>
      	<textarea name="content" id="content" style="width:650px;height:200px">{$content}</textarea>
		<p>以“ftp://”，“http://””，“https://”，“mailto://”开始，则直接跳转至该链接</p>
	  </dd>
    </dl>
	
    <div class="page_btm">
      <input type="submit" class="btn_b" value="提交" />
    </div>
	</form>
  </div>
  </div>
</div>
<script>
$(document).ready(function(){
	//E	=	KISSY.Editor( "content" );
	loadEditor("content");
});
</script>
<include file="../Public/_footer.html" />